package models

type StareAgeGender struct {
	ID         string `gorm:"primaryKey;column:id;type:bigint;not null;comment:id" json:"id"`
	MerchantID string `gorm:"column:merchant_id;type:varchar(30);not null;default:'';comment:商户id" json:"merchant_id"`
	RobotName  string `gorm:"column:robot_name;type:varchar(50);not null;default:'';comment:设备名称;index:idx_date_starecount,priority:2;index:idx_startTime_robotName,priority:2;" json:"robot_name"`
	Date       string `gorm:"index:idx_date_starecount,priority:1;column:date;type:varchar(10);not null;default:'1970-01-01';comment:日期" json:"date"`
	StartTime  int64  `gorm:"column:start_time;type:int;size:64;not null;default:0;comment:起始时间;index:idx_startTime_robotName,priority:1;" json:"start_time"`
	EndTime    int64  `gorm:"column:end_time;type:int;size:64;not null;default:0;comment:结束时间" json:"end_time"`
	Type       int64  `gorm:"column:type;type:int;not null;default:0;comment:类型,0前1左2右3后4总" json:"type"`
	Age        int64  `gorm:"column:age;type:int;not null;default:0;comment:年龄" json:"age"`
	AgeRange   int64  `gorm:"index:idx_date_starecount,priority:3;column:age_range;type:int;not null;default:1;comment:年龄段" json:"age_range"`
	Male       int64  `gorm:"index:idx_date_starecount,priority:4;column:male;type:int;not null;default:0;comment:男性" json:"male"`
	Female     int64  `gorm:"index:idx_date_starecount,priority:5;column:female;type:int;not null;default:0;comment:女性" json:"female"`
	LocationID string `gorm:"column:location_id;type:bigint;default:0;comment:商场ID" json:"location_id"`
	CreatedAt  int64  `gorm:"column:created_at;autoCreateTime;type:int;size:64;default:0;comment:创建时间" json:"created_at"`
}

func (m StareAgeGender) TableName() string {
	return "stare_age_gender"
}

// 模式自动注册
func init() {
	Models = append(Models, &StareAgeGender{})
}

// 用于分表的model
type StareAgeGenderTpl struct {
	StareAgeGender
}

func (m StareAgeGenderTpl) TableName() string {
	return "stare_age_gender_tpl"
}
